# Governing in the face of a global crisis: when do voters punish and reward incumbents?

## Replication Materials

These materials contain the formatted data, functions, and analysis code for the results presented in *"Governing in the face of a global crisis: when do voters punish and reward incumbents?"* by Raymond Duch, Peter Loewen, Thomas S. Robinson, and Alexei Zakharov (in press at Proceedings of the National Academy of Sciences)

Files are stored as follows:

* **formatted_data/** -- contains post-processed data generated using `0_format_data.R`
* **models/** -- contains trained cjbart, VIMP, and PCA model snapshots used for heterogeneity analysis

	* The `conjoint_mod...` files need to be unzipped prior to being accessed
	
* **tables/** and **figures/** -- copies of all figures in the main manuscript and supplementary information

* `0_*.R` -- R scripts used to create the formatted data -- *n.b.* external data and "raw" CANDOUR-II datasets are omitted. Please contact the authors if further information/data is required
* `1_ols_analysis.R` -- main analysis script for all linear model analysis (incl. benchmarking)
* `2_het_analysis.R` -- main script for heterogeneous effects analysis using machine learning